File: /var/www/html/owlcrm/resources/views/users/posts/show.blade.php
@extends('adminlte::page')
@section('title', 'OWL CRM Dashboard')
@section('content_header')
<h1>Post Sale</h1> <!-- Changed from 'postsales' to 'Post Sale' -->
@stop
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Post Sale Information</h3> <!-- Changed from 'postsales' to 'Post Sale' -->
<div class="card-tools">
<button type="button" class="btn btn btn-dark">
<i class="fas fa-plus"></i>
Add Information
</button>
<button type="button" class="btn btn-tool" data-card-widget="collapse">
<i class="fas fa-minus"></i>
</button>
{{-- <button type="button" class="btn btn-tool" data-card-widget="remove">
<i class="fas fa-times"></i>
</button> --}}
</div>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item"><b>Title:</b> {{ $postSale->title }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>First Name:</b> {{ $postSale->first_name }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Last Name:</b> {{ $postSale->last_name }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Email:</b> {{ $postSale->email_address }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Phone:</b> {{ $postSale->phone }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Mobile Number:</b> {{ $postSale->mobile_number }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Address:</b>
{{ $postSale->city?->name ?? 'N/A' }}, {{ $postSale->state?->name ?? 'N/A' }}, {{ $postSale->country?->name ?? 'N/A' }}, {{ $postSale->postal_code ?? 'N/A' }}
</li>
@if (isset($postSale->organization_name) && !empty($postSale->organization_name))
<li class="list-group-item"><b>Organisation Name:</b> {{ $postSale->organization_name }}</li> <!-- Changed $lead to $postSale -->
@else
<li class="list-group-item"><b>Organisation Name:</b> Individual</li>
@endif
<li class="list-group-item"><b>Designation:</b> {{ $postSale->designation }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Budget:</b> {{ $postSale->budget }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Last Contacted:</b> {{ formatDate($postSale->last_contacted, 'Y/m/d H:i:s') }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Next Followup:</b> {{ formatDate($postSale->next_followup, 'Y/m/d H:i:s') }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Address line 1:</b> {{ $postSale->address_line_1 }}</li> <!-- Changed $lead to $postSale -->
<li class="list-group-item"><b>Address line 2:</b> {{ $postSale->address_line_2 }}</li> <!-- Changed $lead to $postSale -->
@if (isset($postSale->customer_id))
<li class="list-group-item"><b>Customer:</b>
{{ $postSale->get_customer ? $postSale->get_customer->first_name : '' }}
{{ $postSale->get_customer ? $postSale->get_customer->last_name : '' }}
</li> <!-- Changed $lead to $postSale -->
@endif
</ul>
</div>
</div>